class Cache {
  static  data = {}
  static get(key) { return this.data[key]  }
  static set(key, val) { this.data[key] = val }
}




let user = {
  name: "后盾人",
  key: Symbol("缓存")
};

let cart = {
  name: "购物车",
  key: Symbol("购物车")
};

Cache.set(user.key, user);
Cache.set(cart.key, cart);
console.log(Cache.get(user.key));